home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 87 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  3.3 KB

  1. Path: fido.asd.sgi.com!austern
  2. From: bill@amber.ssd.hcsc.com (Bill Leonard)
  3. Newsgroups: comp.std.c++
  4. Subject: Re: Throwing an exception from within a si
  5. Date: 22 Jan 1996 09:41:13 PST
  6. Organization: Harris Computer Systems, Ft. Lauderdale FL
  7. Approved: austern@isolde.mti.sgi.com
  8. Message-ID: <4dsne7$1fv@hawk.hcsc.com>
  9. References: <4doh5o$k04@wcap.centerline.com> <4dos4l$ra9@engnews1.Eng.Sun.COM>
  10. Reply-To: Bill.Leonard@hawk.hcsc.com
  11. NNTP-Posting-Host: isolde.mti.sgi.com
  12. X-Original-Date: 21 Jan 1996 06:45:27 GMT
  13. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  14.     iQBVAwUBMQPMV0y4NqrwXLNJAQFeywIAmUaooRHbpQsk7Wa4lZZDdW8VCYI7HJl+
  15.     aVVTBATOgP0Smr6r00HTk4PKG6WzYav209LWX87ZHuvul7P6VYHSDw==
  16.     =Yxib
  17. Originator: austern@isolde.mti.sgi.com
  18.  
  19. In article <4dos4l$ra9@engnews1.Eng.Sun.COM>, clamage@Eng.Sun.COM (Steve Clamage) writes:
  20. > I have longer experience with non-RISC implementations than with RISC
  21. > implementations. It is common for non-RISC implemenations not to have
  22. > a recognizable function preamble or postamble. There are not just two or
  23. > three possible instruction sequences making up function entry and exit --
  24. > there are dozens or even hundreds of possible sequences. If you standardize
  25. > on recognizeable entry and exit sequences you take a noticeable performance
  26. > hit, particularly on popular benchmark programs.
  27.  
  28. I have quite a bit of experience designing and implementing compilers and
  29. programming tools (such as debuggers) on both RISC and non-RISC
  30. architectures.  What Steve says is correct, but more importantly, it is not
  31. limited to non-RISC architectures.  RISC compilers are becoming ever more
  32. aggressive at optimization, and one of the areas that gets increasing
  33. attention is function entry and exit.
  34.  
  35. Even without optimization, function entry and exit on many RISC machines is
  36. not limited to a few recognizeable sequence of instructions.  Register
  37. saving and restoring, for instance, can add lots of instructions to the
  38. preamble or postamble.
  39.  
  40. But when you factor in optimizations such as sinking register saves and
  41. hoisting register restores, moving user instructions into the preamble,
  42. speculative execution of instructions, and so forth, the number of possible
  43. sequences is infinite.
  44.  
  45. Now weigh against that the benefit, if there is any, of allowing an
  46. exception to propagate out of a signal handler.  Does it buy you enough to
  47. *require* RISC compilers to throw away huge performance gains?  Not in my
  48. opinion.
  49.  
  50. -- 
  51. Bill Leonard
  52. Harris Computer Systems Corporation
  53. 2101 W. Cypress Creek Road
  54. Fort Lauderdale, FL  33309
  55. Bill.Leonard@mail.hcsc.com
  56.  
  57. These opinions and statements are my own and do not necessarily reflect the
  58. opinions or positions of Harris Computer Systems Corporation.
  59.  
  60. ------------------------------------------------------------------------------
  61. There's something wrong with an industry in which amazement is a common
  62. reaction to things going right.
  63.  
  64. "Hard work never scared me.  Oh, sure, it has startled me from a distance."
  65.                                                        -- Professor Fishhawk
  66. ------------------------------------------------------------------------------
  67. ---
  68. [ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  69.   Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  70.   is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
  71.